<!-- 全部與SQL Server連線都經由此php -->
<?php
	class MySQL {
		function connect($mysql_host, $mysql_user, $mysql_passwd, $mysql_db) {
			$mysql = mysql_connect($mysql_host, $mysql_user, $mysql_passwd) or die("Can't Connect To Mysql");
			mysql_query("SET NAMES utf8");
            $select_db = mysql_select_db($mysql_db, $mysql); 
            return $mysql;
		}		
		public function query_row($query, $connect) {
	        $result = mysql_query($query, $connect) or die('execute sql command fail');
			$row = mysql_fetch_row($result);
			return $row;
		}	
		public function query($query, $connect) {
			$result = mysql_query($query, $connect) or die('execute sql command fail');
		}
	}
?>